/*
 * @Author: zehao.chen
 * @Date: 2022-07-10 11:03:30
 * @LastEditors: zehao.chen
 * @LastEditTime: 2022-07-30 18:35:16
 * @FilePath: /meeting-admin/src/service.js
 * @Description:
 *
 */
import http from '@/utils/request'

//  保存电脑桌面
export const saveDesktopList = (data, config) => {
  let url = `/sendfile/computer/desktop/save`
  return http.post(url, data, config)
}

//  获取电脑桌面列表
export const getDesktopList = (data, config) => {
  let url = `/sendfile/computer/desktop/page`
  return http.get(url, {params: data}, config)
}

//  获取分发文件
export const getFileList = (data, config) => {
  let url = `/sendfile/media/manage/page`
  return http.get(url, {params: data}, config)
}

//  获取窗口布局
export const getLayoutList = (data, config) => {
  let url = `/sendfile/layout/manage/page`
  return http.get(url, {params: data}, config)
}

//  保存窗口布局
export const saveWindowLayout = (data, config) => {
  let url = `/sendfile/layout/manage/save`
  return http.post(url, data, config)
}

//  删除窗口布局
export const delWindowLayout = (data, config) => {
  let url = `/sendfile/layout/manage/delete`
  return http.post(url, data, config)
}

//  上移下移
export const moveWindowLayout = (data, config) => {
  let url = `/sendfile/layout/manage/upOrDown?id=${data.id}&state=${data.state}`
  return http.post(url, data, config)
}

export const saveFileContent = (data, config) => {
  let url = `/sendfile/media/manage/save`
  return http.post(url, data, config)
}

//  保存场景
export const saveWindowScene = (data, config) => {
  let url = `/sendfile/scene/manage/save`
  return http.post(url, data, config)
}

//  删除场景
export const delWindowScene = (data, config) => {
  let url = `/sendfile/scene/manage/delete`
  return http.post(url, data, config)
}

//  获取场景
export const getWindowScene = (data, config) => {
  let url = `/sendfile/scene/manage/page`
  return http.get(url, {params: data}, config)
}

//  获取场景详情
export const getWindowSceneDetail = (data, config) => {
  let url = `/sendfile/scene/manage/getDetailBySceneId`
  return http.get(url, {params: data}, config)
}

export const delFileContent = (data, config) => {
  let url = `/sendfile/media/manage/delete`
  return http.post(url, data, config)
}

export const getFileGroupList = (data, config) => {
  let url = `/sendfile/media/group/page`
  return http.get(url, {params: data}, config)
}

export const getQuickOperateList = (data, config) => {
  let url = `/sendfile/media/quickly/page`
  return http.get(url, {params: data}, config)
}

export const getQuickOperateContentList = (data, config) => {
  let url = `/sendfile/media/quickly/detail/page`
  return http.get(url, {params: data}, config)
}

export const quicklySave = (data, config) => {
  let url = `/sendfile/media/quickly/save`
  return http.post(url, data, config)
}

export const quicklyDel = (data, config) => {
  let url = `/sendfile/media/quickly/delete`
  return http.post(url, data, config)
}

export const quicklySend = (data, config) => {
  let url = `/sendfile/media/send-record/create`
  return http.post(url, data, config)
}

// 快捷分发
export const quicklyListSend = (data, config) => {
  let url = `/sendfile/media/quickly/send/create`
  return http.post(url, data, config)
}
